/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package tuneViews;

import javax.swing.JLabel;

/**
 *
 * @author Israel Agyeman-Premp
 */
public class Mini extends javax.swing.JFrame {

    /**
     * Creates new form Mini
     */
    public Mini() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        youtube = new javax.swing.JLabel();
        track = new javax.swing.JLabel();
        pause = new javax.swing.JLabel();
        play = new javax.swing.JLabel();
        open = new javax.swing.JLabel();
        power = new javax.swing.JLabel();
        volume = new javax.swing.JLabel();
        stop = new javax.swing.JLabel();
        bg = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setMaximumSize(new java.awt.Dimension(370, 150));
        setMinimumSize(new java.awt.Dimension(370, 150));
        setName("Mini"); // NOI18N
        setUndecorated(true);
        setPreferredSize(new java.awt.Dimension(370, 150));
        setResizable(false);
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        youtube.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/you-tube.png"))); // NOI18N
        youtube.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                youtubeMouseClicked(evt);
            }
        });
        getContentPane().add(youtube, new org.netbeans.lib.awtextra.AbsoluteConstraints(260, 20, -1, 50));

        track.setFont(new java.awt.Font("Roboto Light", 0, 18)); // NOI18N
        getContentPane().add(track, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 80, 240, 60));

        pause.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/pause-03.png"))); // NOI18N
        pause.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                pauseMouseClicked(evt);
            }
        });
        getContentPane().add(pause, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 20, -1, -1));

        play.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/play-03.png"))); // NOI18N
        play.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                playMouseClicked(evt);
            }
        });
        getContentPane().add(play, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 10, -1, 70));

        open.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/quick-open.png"))); // NOI18N
        open.setText("jLabel1");
        open.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                openMouseClicked(evt);
            }
        });
        getContentPane().add(open, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 90, 30, 40));

        power.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/close.png"))); // NOI18N
        getContentPane().add(power, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 0, 20, -1));

        volume.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/volume-down.png"))); // NOI18N
        volume.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                volumeMouseClicked(evt);
            }
        });
        getContentPane().add(volume, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 100, -1, -1));

        stop.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/stop-03.png"))); // NOI18N
        stop.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                stopMouseClicked(evt);
            }
        });
        getContentPane().add(stop, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 20, -1, -1));

        bg.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/mini-view.png"))); // NOI18N
        bg.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                bgMousePressed(evt);
            }
        });
        bg.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseDragged(java.awt.event.MouseEvent evt) {
                bgMouseDragged(evt);
            }
        });
        getContentPane().add(bg, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 370, 150));

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void stopMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_stopMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_stopMouseClicked

    private void playMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_playMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_playMouseClicked

    private void pauseMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_pauseMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_pauseMouseClicked

    private void youtubeMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_youtubeMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_youtubeMouseClicked

    private void openMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_openMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_openMouseClicked

    private void volumeMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_volumeMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_volumeMouseClicked

    private void bgMouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_bgMouseDragged
        // TODO add your handling code here:
        int x = evt.getXOnScreen();
        int y = evt.getYOnScreen();
        this.setLocation(x-xMouse,y-yMouse);
    }//GEN-LAST:event_bgMouseDragged

    private void bgMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_bgMousePressed
        // TODO add your handling code here:
        xMouse = evt.getX();
        yMouse = evt.getY();
    }//GEN-LAST:event_bgMousePressed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Mini.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Mini.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Mini.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Mini.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Mini().setVisible(true);
            }
        });
    }
    
    public JLabel stopBtn(){
        return stop;
    }
    
    public JLabel playBtn(){
        return play;
    }
    
    public JLabel pauseBtn(){
        return pause;
    }
    
    public JLabel volume(){
        return volume;
    }
    
    public JLabel getBg(){
        return bg;
    }
    
    public JLabel displayTrack(){
        return track;
    }
    
     public JLabel youTube(){
        return youtube;
    }
     
    /**
    *A method that returns the quickOpen button on the HUB
     * @return 
    */
    public JLabel quickOpen(){
        return open;
    }
     
     public JLabel powerBtn(){
        return power;
    }
     
     int xMouse,yMouse;

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel bg;
    private javax.swing.JLabel open;
    private javax.swing.JLabel pause;
    private javax.swing.JLabel play;
    private javax.swing.JLabel power;
    private javax.swing.JLabel stop;
    private javax.swing.JLabel track;
    private javax.swing.JLabel volume;
    private javax.swing.JLabel youtube;
    // End of variables declaration//GEN-END:variables
}
